<script>
    _this.onLoad(function () {
        Program.id_tvshow = 0;
        //$("#page_indexindex").empty();
        $(".UI_Popup .UI_Header .Header_btn,.Header_text").UI_AddClassHover("hover");
        Infobar.initEvent();
        //List.initEvent(_this.LAYOUT); //Khởi tạo sự kiện cho list show
        $("#page_indexhome .Header_text").off("tap");
        $("#page_indexhome .Header_text").on("tap", function () {
            Toast.notification_close();
            Toast.close();
//            console.log(PopupPanel.flag);
//            console.log(PopupPanel.isOpen());
//            console.log($(this).hasClass("active"));
            if (PopupPanel.flag == false && PopupPanel.isOpen() == false && $(this).hasClass("active") == false) {
                PopupPanel.open();

                $(this).addClass("active");
                $("#Wait_PopupPanel").css("display", "block");
                if ($('#Wait_PopupPanel .Wait_inner .spiner').length == 0) {
                    _this.uiWaitOptions.color = "#777";
                    new Spinner(_this.uiWaitOptions).spin(document.querySelector('#Wait_PopupPanel .Wait_inner'));
                }
                setTimeout(function () {
                    List.gets(function () {
                        $("#Wait_PopupPanel").css("display", "none");
                    });
                }, 200);
            } else if (PopupPanel.flag == true && PopupPanel.isOpen() == true) {
                PopupPanel.close();
            }
        });


        if (_this.storage.get("mute") == "stop") {
            $("#page_indexhome .Mute").addClass("stop");
        }
        $("#page_indexhome .Mute").off("tap");
        $("#page_indexhome .Mute").on("tap", function () {
            if (!$(this).hasClass('stop')) {
                $(".Mute").addClass('stop');
                _this.storage.set("mute", "stop");
            } else {
                $(".Mute").removeClass('stop');
                _this.storage.set("mute", "play");
            }
            return false;
        });

        loadSlide(function () {
            loadTvShowRunning();
            $(".RefreshSlider").removeClass("loading");
        });

        $(".RefreshSlider").UI_AddClassHover("hover");
        $(".RefreshSlider").off("tap");
        $(".RefreshSlider").on("tap", function () {
            $(".RefreshSlider").addClass("loading");
            $(".Slide").addClass("empty");
            loadSlide(function () {
                setTimeout(function () {
                    $(".RefreshSlider").removeClass("loading");
                }, 1000);
            });
        });
    });


</script>
<div class="UI_Header">
    <div class="Inner">
        <a class="Header_btn navInfo Right_1"><span class="fa fa-user"></span></a>
        <span class="Header_text">
            <div class="image" style="background: url(public/images/c_03.png) no-repeat center center"></div>
            <div class="around-marquee"></div>
        </span>
    </div>
</div>
<div class="UI_Body FadeIn">
    <div id="Home">
        <div class="Slide empty">
            <div class="Inner">

            </div>
        </div>
        <div class="pagination">
            <div class="swiper-container swiper-nav">

            </div>
        </div>
    </div>
</div>
<div class="UI_Footer">
    <a href="#" class="Mute"></a>
    <p>Sản phẩm của <img src="public/images/vtv-digital.png" alt=""/></p>
</div>
<div class="RefreshSlider">
    <div> <span class="fa fa-rotate-right"></span></div>
</div>